/**
 * @author 2404559603@qq.com
 * @time 2022-04-19 16:45 PM
 * @description 登录页面的接口封装
 */

import Ajax from './Ajax.js'


// 获取验证码接口
export function getCode(tel) {  
  return Ajax({
    url:'/get/code',
    method:'post',
    data:{phone:tel}
  })
}

// 验证码登录
export function login(data) {  
  return Ajax({
    url:'/login/byphone',
    method:'post',
    data:{phone:data.tel,code:data.code}
  })
}

// 自动登录
export function autologin() {  
  return Ajax({
    url:'/auto/login',
    method:'post',
  })
}
